package com.example.userservice.utils;

import lombok.Data;

/**
 * 全局统一返回结果类
 */
@Data
public class ResultData {
    private String msg;
    private int code;
    private boolean flag;
    private Object data;

    public static  ResultData success(Object data){
        ResultData resultData = new ResultData();
        resultData.setCode(200);
        resultData.setFlag(true);
        resultData.setMsg("操作成功");
        resultData.setData(data);
        return  resultData;
    }
}
